In the art of optical communication the optical receiver often includes a function to provide an RSSI (Received Signal Strength Indication) signal and/or so-called LOS (Loss Of Signal) indicators or Squelch. The RSSI measurement generally provides a measure of the received DC signal which may be beneficial to allow active alignment between an optical fiber and the photodiode and/or to monitor the performance of the transmitter at the other end. The LOS (and/or Squelch) indicator may for example be used to indicate if the transmitter at the other end is present and/or whether the transmitter at the other end has become worn so that failure is eminent or already has occurred. In the optical receiver arranged to detect the current from a photodiode, the circuit detects an average of the photocurrent generated in the photodiode by inserting a resistor in a bias line to the photodiode and detecting voltage across the resistor caused by the photocurrent. One challenge is that the photocurrent may have a large dynamic range. For low current the voltage across the resistor may be difficult to detect accurate and for large current the headroom required by the photodiode may be violated. Accordingly, there is a need to provide reliable measurements of the photocurrent for high and low values of the photocurrent.